package com.leizi.igym.enums;

import java.util.Arrays;

/**
 * @Author: leizi0110
 * @CreateTime: 2024-05-04  22:56
 * @Description:
 */

public enum LineStatisticsDateEnum {
    RECENT_WEEK(7),
    RECENT_HALF_MONTH(15),
    RECENT_MONTH(30);

    private final Integer date;

    public Integer getDate() {
        return date;
    }

    LineStatisticsDateEnum(Integer date) {
        this.date = date;
    }

    public static LineStatisticsDateEnum getDateValue(Integer date){
       return Arrays.stream(LineStatisticsDateEnum.values()).filter(x->x.getDate().equals(date)).findFirst().orElse(null);
    }
}
